<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="author" content="wangbo">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>3d旋转</title>
  <!-- 内部样式 -->
  <style>
    body{
      perspective: 300px;
    }
    .box{
      position: relative;
      width: 200px;
      height: 200px;
      transition: all 2s ;
      margin: 100px auto;
      transform-style: preserve-3d;
    }
    .box div{
      text-align: center;
      line-height: 200px;
      border-radius: 50%;
      position: absolute;
      width: 100%;
      height: 100%;
    }
    .box div:first-child{
      z-index: 1;
      background-color: red;
    }
    .box div:last-child{
      transform: rotateY(180deg);
      background-color:aqua;
    }
    .box:hover{
      transform: rotateY(180deg);
    }
  </style>
</head>
<body>
  <div class="box">
    <div>程序员</div>
    <div>项目经理</div>
  </div>
</body>
</html>